		
		<div id="task_edit_bgmask"></div>
		<div id="tooltip"></div>
		<div id="task_edit" style="display:none;">
			<input type="hidden" id="h_task_id" name="h_task_id" value=""/>
			<table class="task_edit_table" cellspacing="0" cellpadding="0" border="0" width="100%" height="100%">
				<tr>
					<td class="blueborder" width="100%" align="left" valign="top">
						<div id="edit_header"><span style="float:left"><?php echo lang('edit_task') ?></span><span style="float:right;margin-top:2px;margin-right:10px;"><a href="" id="close_dialog_link"><img src="/img/close.png"/></a></span></div>
						<div id="edit_inner">
							<table cellspacing="10" cellpadding="10" border="0" width="100%">
								<tr>
									<td width="20%" align="right" valign="top">
										<label class="edit_label" for="edit_textarea"><?php echo lang('task') ?></label>
									</td>
									<td align="left" valign="top" id="td_textarea">	
									</td>
								</tr>
								<tr>
									<td align="right" valign="middle">
										<label for="edit_tags" class="edit_label"><?php echo lang('tags') ?></label>
									</td>
									<td align="left" valign="middle">
										<input type="text" id="edit_tags" name="edit_tags" style="width:400px;float:left;"/>
										<img src="/img/information.png" style="float:left;margin-top:3px;margin-left:3px;" onmouseover="showTooltip(event, '<?php echo lang('tag_tooltip') ?>', 240);" onmouseout="hideTooltip();"/>
									</td>
								</tr>
								<tr>
									<td align="right" valign="middle">
										<label for="duedate" class="edit_label"><?php echo lang('duedate') ?></label>
									</td>
									<td align="left" valign="middle">
										<input id="duedate" type="text" id="duedate" name="duedate" style="width:130px;float:left;"/>
										<img src="/img/calendar.png" style="margin-top:3px;" onmouseover="showTooltip(event, '<?php echo lang('duedate_tooltip'); ?>', 200)" onmouseout="hideTooltip();"/>
									</td>
								</tr>
								<tr>
									<td align="right"><div id="ajaxloader"><img src="/img/ajax-loader.gif" title="Ajax Loader Image" alt="Ajax Loader Image"/></div></td>
									<td align="left">
										<input type="button" id="btn_savetask" name="btn_savetask" value="<?php echo lang('save') ?>" style="margin:10px 0px;"/>
										<input type="button" id="btn_cancel" name="btn_cancel" value="<?php echo lang('cancel') ?>" style="margin-top:10px;"/>
									</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
			</table>
		</div>
		
		<div id="content_left">
			<noscript><div class="nojavascript"><?php echo lang('no_javascript') ?></div></noscript>
			
			<?php if(isset($message)) : ?>
			<div class="error_message"><?php echo $message ?></div>
			<?php endif; ?>
			
			<div id="newtask">
				<div><label for="taskcontent" class="title"><?php echo lang('new_task') ?></label></div>
				<div>
					<form action="/tasks/add" method="post">
						<input type="text" id="taskcontent" name="taskcontent" style="width:85%"/>
						<input type="submit" id="btn_addtask" name="btn_addtask" value="<?php echo lang('btn_addtask') ?>"/>
						<input type="hidden" name="action" value="addtask"/>
					</form>
				</div>
			</div>
			
			<div id="div_tasklist">
				<table class="task_table" id="today" cellspacing="0" cellpadding="5" border="0" width="100%">
				<thead>
					<tr>
						<td><a href="" class="collapse_link minus">&nbsp;</a> <?php echo lang('today') ?></td>
						<td align="right" width="20%"><div id="clockDiv">aaaa</div></td>
					</tr>
				</thead>
				<tbody>
					<?php if(@$tasks['today']) : ?>
					<?php foreach( @ $tasks['today'] as $task) : ?>
					<tr <?php echo ( (int)$task->duedate > 0 && strtotime($task->duedate) < time() && (int)$task->state == 0 ) ? 'class="overdue"' : ''; ?> id="tr_<?php echo $task->task_id ?>">
						<td colspan="2">
							<span class="left">
								<input class="task_checkbox" type="checkbox" id="<?php echo $task->task_id ?>" name="<?php echo $task->task_id ?>" <?php echo $task->state == 1 ? 'checked="checked"':'' ?>/>
							</span>
							<span id="contentid_<?php echo $task->task_id ?>" class="task_content <?php echo $task->state == 1 ? 'stroke':'' ?> <?php echo getPiorityCSS_class($task->priority) ?>" onmouseover="document.getElementById(this.id).style.cursor='pointer';" title="<?php echo htmlspecialchars($task->tags) ?>">
								<?php echo htmlspecialchars($task->content) ?>
							</span>
							<span class="task_delete">
								<a href="" id="downlink_<?php echo $task->task_id ?>" class="down_link"><img src="/img/down.png"/></a>
								<div id="submenu_<?php echo $task->task_id ?>" class="task_submenu">
									<span class="span_priority"><?php echo lang('priority') ?> 
										<a href="" class="priority_1 priority_link" id="priority_1_<?php echo $task->task_id ?>">1</a> 
										<a href="" class="priority_2 priority_link" id="priority_2_<?php echo $task->task_id ?>">2</a> 
										<a href="" class="priority_3 priority_link" id="priority_3_<?php echo $task->task_id ?>">3</a>
									</span>
									<span><a href="" id="delete_<?php echo $task->task_id ?>" class="task_delete_link"><?php echo lang('delete') ?></a></span>
								</div>
							</span>
							<span class="task_date">
								<?php echo date('d-M H:i', strtotime($task->date_created)) ?>
							</span>
							<input type="hidden" name="tags_<?php echo $task->task_id ?>" id="tags_<?php echo $task->task_id ?>" value="<?php echo htmlspecialchars($task->tags) ?>"/>							
							<input type="hidden" name="duedate_<?php echo $task->task_id ?>" id="duedate_<?php echo $task->task_id ?>" value="<?php echo (int)$task->duedate > 0 ? date('d-m-Y', strtotime($task->duedate)) : ''; ?>"/>
						</td>
					</tr>
					<?php endforeach; ?>
					<?php endif; ?>
				</tbody>
				</table>
				
				<?php if(@$tasks['yesterday']) : ?>
				<table class="task_table" id="yesterday" cellspacing="0" cellpadding="5" border="0" width="100%">
				<thead>
					<tr><td>[+] <?php echo lang('yesterday') ?></td></tr>
				</thead>
				<tbody>
					<?php foreach($tasks['yesterday'] as $task) : ?>				
					<tr>
						<td>
							<input type="checkbox" id="<?php echo $task->task_id ?>" name="<?php echo $task->task_id ?>"/>
							&nbsp;
							<?php echo $task->content ?>
						</td>
					</tr>
					<?php endforeach; ?>
					
				</tbody>
				</table>
				<?php endif; ?>

				<?php if(@$tasks['before_yesterday']) : ?>
				<table class="task_table" id="before_yesterday" cellspacing="0" cellpadding="5" border="0" width="100%">
				<thead>
					<tr><td>[+] <?php echo lang('before_yesterday') ?></td></tr>
				</thead>
				<tbody>
					<?php foreach($tasks['before_yesterday'] as $task) : ?>				
					<tr>
						<td>
							<input type="checkbox" id="<?php echo $task->task_id ?>" name="<?php echo $task->task_id ?>"/>
							&nbsp;
							<?php echo $task->content ?>
						</td>
					</tr>
					<?php endforeach; ?>
					
				</tbody>
				</table>
				<?php endif; ?>

				<?php if(@$tasks['before_week']) : ?>
				<table class="task_table" id="before_week" cellspacing="0" cellpadding="5" border="0" width="100%">
				<thead>
					<tr><td>[+] <?php echo lang('before_week') ?></td></tr>
				</thead>
				<tbody>
					<?php foreach($tasks['before_week'] as $task) : ?>				
					<tr>
						<td>
							<input type="checkbox" id="<?php echo $task->task_id ?>" name="<?php echo $task->task_id ?>"/>
							&nbsp;
							<?php echo htmlspecialchars($task->content) ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
				</table>
				<?php endif; ?>

				<?php if(@$tasks['before_month']) : ?>				
				<table class="task_table" id="before_month" cellspacing="0" cellpadding="5" border="0" width="100%">
				<thead>
					<tr><td>[+] <?php echo lang('before_month') ?></td></tr>
				</thead>
				<tbody>
					<?php foreach($tasks['before_month'] as $task) : ?>				
					<tr>
						<td>
							<input type="checkbox" id="<?php echo $task->task_id ?>" name="<?php echo $task->task_id ?>"/>
							&nbsp;
							<?php echo $task->content ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
				</table>
				<?php endif; ?>
			</div>
		</div>
		<div id="ajaxloader-big"><?php echo lang('deleting') ?><br/><br/><img src="/img/ajax-loader-big.gif"/></div>
		<span style="display:none" id="str_tags"><?php echo $str_tags ?></span>